import { EntityBase } from 'ibiz-core';
import { IORDERDETAILS } from '../interface';

/**
 * 订单详细基类
 *
 * @export
 * @abstract
 * @class ORDERDETAILSBase
 * @extends {EntityBase}
 * @implements {IORDERDETAILS}
 */
export abstract class ORDERDETAILSBase extends EntityBase implements IORDERDETAILS {
    /**
     * 实体名称
     *
     * @readonly
     * @type {string}
     * @memberof ORDERDETAILSBase
     */
    get srfdename(): string {
        return 'ORDERDETAILS';
    }
    get srfkey() {
        return this.orderdetailsid;
    }
    set srfkey(val: any) {
        this.orderdetailsid = val;
    }
    get srfmajortext() {
        return this.orderdetailsname;
    }
    set srfmajortext(val: any) {
        this.orderdetailsname = val;
    }
    /**
     * 订单详细标识
     */
    orderdetailsid?: any;
    /**
     * 订单详细名称
     */
    orderdetailsname?: any;
    /**
     * 建立时间
     */
    createdate?: any;
    /**
     * 建立人
     */
    createman?: any;
    /**
     * 更新人
     */
    updateman?: any;
    /**
     * 更新时间
     */
    updatedate?: any;
    /**
     * 金额
     */
    je?: any;
    /**
     * 商品名称
     */
    spmc?: any;
    /**
     * 购买日期
     */
    gmrq?: any;
    /**
     * 订单标识
     */
    order1id?: any;
    /**
     * 商品类别
     *
     * @type {('100' | '200' | '300' | '400')} 100: 衣服, 200: 鞋子, 300: 电脑, 400: 文具
     */
    splb?: '100' | '200' | '300' | '400';

    /**
     * 重置实体数据
     *
     * @private
     * @param {*} [data={}]
     * @memberof ORDERDETAILSBase
     */
    reset(data: any = {}): void {
        super.reset(data);
        this.orderdetailsid = data.orderdetailsid || data.srfkey;
        this.orderdetailsname = data.orderdetailsname || data.srfmajortext;
    }
}
